import type { LoginResult } from '@/types/member'
import { http } from '@/utils/http'

type loginParams = {
  encryptedData: string
  code: string
  vi: string
}
// 微信小程序登录
export const wxLogin = (data: loginParams) => {
  return http<LoginResult>({
    url: '/login/wxMin',
    method: 'POST',
    data,
  })
}
// 内侧小程序登录
export const simpleLogin = (phoneNumber: string) => {
  return http<LoginResult>({
    url: '/login/wxMin/simple',
    method: 'POST',
    data: {
      phoneNumber,
    },
  })
}
